Skip to content

Conversation

@DanielRosenwasser
Copy link
Member

@DanielRosenwasser DanielRosenwasser commented Jan 21, 2026

Part of #62333.

I did something similar to #62989, but looked for the first //\s+@ comment line, falling back to the first //// line. The script bails out if the word "baseline" appeared anywhere in the file.

Just like #62989, this doesn't get everything because @strict matches @strictNullChecks, so it's overly conservative. I'll have a follow-up PR for that.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds // @strict: false compiler directive to 135 fourslash test files that were previously failing with strict mode enabled. The changes are part of an effort to systematically address strict mode test failures by disabling strict mode for tests that do not use baseline verification.

Changes:

  • Adds // @strict: false directive to 135 fourslash test files
  • Directive is consistently placed after the reference path comment and before other compiler directives or test code
  • Changes are automated via script as described in PR description

Reviewed changes

Copilot reviewed 147 out of 147 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/cases/fourslash/unusedVariableInClass4.ts Added // @strict: false directive
tests/cases/fourslash/unusedVariableInClass2.ts Added // @strict: false directive
tests/cases/fourslash/unusedVariableInClass1.ts Added // @strict: false directive
tests/cases/fourslash/unusedTypeParametersInLambda4.ts Added // @strict: false directive
tests/cases/fourslash/unusedTypeParametersInLambda3.ts Added // @strict: false directive
tests/cases/fourslash/unusedParameterInLambda3.ts Added // @strict: false directive
tests/cases/fourslash/unusedParameterInFunction2.ts Added // @strict: false directive
tests/cases/fourslash/unusedClassInNamespace4.ts Added // @strict: false directive
tests/cases/fourslash/underscoreTypings02.ts Added // @strict: false directive
tests/cases/fourslash/unclosedArrayErrorRecovery.ts Added // @strict: false directive
tests/cases/fourslash/superInDerivedTypeOfGenericWithStatics.ts Added // @strict: false directive
tests/cases/fourslash/squiggleIllegalSubclassOverride.ts Added // @strict: false directive
tests/cases/fourslash/squiggleFunctionExpression.ts Added // @strict: false directive
tests/cases/fourslash/signatureHelpOptionalCall2.ts Added // @strict: false directive
tests/cases/fourslash/signatureHelpCallExpressionJs.ts Added // @strict: false directive
tests/cases/fourslash/refactorConvertToGetAccessAndSetAccess10.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoWidenedTypes.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoSignatureRestParameterFromUnion2.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoSignatureOptionalParameterFromUnion1.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoOnNarrowedTypeInModule.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoOnMergedModule.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoOnMergedInterfacesWithIncrementalEdits.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoOnCatchVariable.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoJsDocNonDiscriminatedUnionSharedProp.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoGenericTypeArgumentInference1.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoForShorthandProperty.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoForObjectBindingElementPropertyName03.ts Added // @strict: false directive
tests/cases/fourslash/quickInfoForContextuallyTypedFunctionInTaggedTemplateExpression2.ts Added // @strict: false directive
tests/cases/fourslash/pasteLambdaOverModule.ts Added // @strict: false directive
tests/cases/fourslash/parenthesisFatArrows.ts Added // @strict: false directive
tests/cases/fourslash/objectLiteralCallSignatures.ts Added // @strict: false directive
tests/cases/fourslash/noSuggestionDiagnosticsOnParseError.ts Added // @strict: false directive
tests/cases/fourslash/multiModuleFundule.ts Added // @strict: false directive
tests/cases/fourslash/jsxAttributeSnippetCompletionUnclosed.ts Added // @strict: false directive
tests/cases/fourslash/jsxAttributeSnippetCompletionClosed.ts Added // @strict: false directive
tests/cases/fourslash/jsxAttributeSnippetCompletionAfterTypeArgs.ts Added // @strict: false directive
tests/cases/fourslash/invertedCloduleAfterQuickInfo.ts Added // @strict: false directive
tests/cases/fourslash/inheritedModuleMembersForClodule2.ts Added // @strict: false directive
tests/cases/fourslash/incompatibleOverride.ts Added // @strict: false directive
tests/cases/fourslash/getSemanticDiagnosticForDeclaration.ts Added // @strict: false directive
tests/cases/fourslash/getDeclarationDiagnostics.ts Added // @strict: false directive
tests/cases/fourslash/genericRespecialization1.ts Added // @strict: false directive
tests/cases/fourslash/genericObjectBaseType.ts Added // @strict: false directive
tests/cases/fourslash/genericMapTyping1.ts Added // @strict: false directive
tests/cases/fourslash/genericInterfacePropertyInference2.ts Added // @strict: false directive
tests/cases/fourslash/genericInterfacePropertyInference1.ts Added // @strict: false directive
tests/cases/fourslash/functionTypes.ts Added // @strict: false directive
tests/cases/fourslash/fixingTypeParametersQuickInfo.ts Added // @strict: false directive
tests/cases/fourslash/extractFunctionContainingThis3.ts Added // @strict: false directive
tests/cases/fourslash/extendsTArray.ts Added // @strict: false directive
tests/cases/fourslash/extendInterfaceOverloadedMethod.ts Added // @strict: false directive
tests/cases/fourslash/extendArrayInterfaceMember.ts Added // @strict: false directive
tests/cases/fourslash/exportEqualTypes.ts Added // @strict: false directive
tests/cases/fourslash/emptyArrayInference.ts Added // @strict: false directive
tests/cases/fourslash/diagnosticsJsFileCompilationDuplicateFunctionImplementation.ts Added // @strict: false directive
tests/cases/fourslash/derivedTypeIndexerWithGenericConstraints.ts Added // @strict: false directive
tests/cases/fourslash/deprecatedInheritedJSDocOverload.ts Added // @strict: false directive (contains baseline call - possible issue)
tests/cases/fourslash/defaultParamsAndContextualTypes.ts Added // @strict: false directive
tests/cases/fourslash/contextualTypingOfArrayLiterals.ts Added // @strict: false directive
tests/cases/fourslash/constEnumsEmitOutputInMultipleFiles.ts Added // @strict: false directive
tests/cases/fourslash/consistentContextualTypeErrorsAfterEdits.ts Added // @strict: false directive
tests/cases/fourslash/completionsOverridingMethod9.ts Added // @strict: false directive
tests/cases/fourslash/completionListsThroughTransitiveBaseClasses2.ts Added // @strict: false directive
tests/cases/fourslash/completionListsThroughTransitiveBaseClasses.ts Added // @strict: false directive
tests/cases/fourslash/completionCloneQuestionToken.ts Added // @strict: false directive
tests/cases/fourslash/codefixInferFromUsageNullish.ts Added // @strict: false directive
tests/cases/fourslash/codeFixUnusedIdentifier_suggestion.ts Added // @strict: false directive
tests/cases/fourslash/codeFixUnusedIdentifier_prefix.ts Added // @strict: false directive
tests/cases/fourslash/codeFixUnusedIdentifier_deleteWrite2.ts Added // @strict: false directive
tests/cases/fourslash/codeFixUndeclaredPropertyObjectLiteral.ts Added // @strict: false directive
tests/cases/fourslash/codeFixUndeclaredPropertyFunctionNonEmptyClass.ts Added // @strict: false directive
tests/cases/fourslash/codeFixUndeclaredPropertyFunctionEmptyClass.ts Added // @strict: false directive
tests/cases/fourslash/codeFixUndeclaredClassInstanceWithTypeParams.ts Added // @strict: false directive
tests/cases/fourslash/codeFixUndeclaredClassInstance.ts Added // @strict: false directive
tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts Added // @strict: false directive
tests/cases/fourslash/codeFixSpellingVsMissingMember.ts Added // @strict: false directive
tests/cases/fourslash/codeFixRenameUnmatchedParameterJS3.ts Added // @strict: false directive
tests/cases/fourslash/codeFixRenameUnmatchedParameterJS2.ts Added // @strict: false directive
tests/cases/fourslash/codeFixRenameUnmatchedParameterJS1.ts Added // @strict: false directive
tests/cases/fourslash/codeFixOverrideModifier_js1.ts Added // @strict: false directive
tests/cases/fourslash/codeFixOverrideModifier9.ts Added // @strict: false directive
tests/cases/fourslash/codeFixOverrideModifier10.ts Added // @strict: false directive
tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports28-long-types.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInitializePrivatePropertyJS.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageString.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageRestParamJS.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageRestParam2JS.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageRestParam2.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageRestParam.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageOptionalParamJS.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageOptionalParam.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageInaccessibleTypes.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageGetter2.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageConstructorFunctionJS.ts Added // @strict: false directive
tests/cases/fourslash/codeFixInferFromUsageConstructor.ts Added // @strict: false directive
tests/cases/fourslash/codeFixForgottenThisPropertyAccess03.ts Added // @strict: false directive
tests/cases/fourslash/codeFixForgottenThisPropertyAccess02.ts Added // @strict: false directive
tests/cases/fourslash/codeFixForgottenThisPropertyAccess01.ts Added // @strict: false directive
tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile8.ts Added // @strict: false directive
tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile7.ts Added // @strict: false directive
tests/cases/fourslash/codeFixDisableJsDiagnosticsInFile6.ts Added // @strict: false directive
tests/cases/fourslash/codeFixCorrectReturnValue8.ts Added // @strict: false directive
tests/cases/fourslash/codeFixCorrectReturnValue20.ts Added // @strict: false directive
tests/cases/fourslash/codeFixCorrectReturnValue19.ts Added // @strict: false directive
tests/cases/fourslash/codeFixCorrectReturnValue18.ts Added // @strict: false directive
tests/cases/fourslash/codeFixCorrectReturnValue10.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementInterfaceSomePropertiesPresent.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementInterfaceMultipleImplementsIntersection2.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementInterfaceMultipleImplements2.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementInterfaceMultipleImplements1.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementInterfaceHeritageClauseAlreadyHaveMember.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementInterfaceDuplicateMember2.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassImplementClassMemberAnonymousClass.ts Added // @strict: false directive
tests/cases/fourslash/codeFixClassExtendAbstractSomePropertiesPresent.ts Added // @strict: false directive
tests/cases/fourslash/codeFixChangeJSDocSyntax15.ts Added // @strict: false directive
tests/cases/fourslash/codeFixCannotFindModule_suggestion.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAwaitInSyncFunction6.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAwaitInSyncFunction6.5.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAddMissingProperties6.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAddMissingProperties44.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAddMissingProperties43.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAddMissingProperties37.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAddMissingProperties33.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAddMissingProperties1.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAddMissingEnumMember12.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAddMissingDeclareProperty.ts Added // @strict: false directive
tests/cases/fourslash/codeFixAddMissingAsync2.ts Added // @strict: false directive
tests/cases/fourslash/cloduleTypeOf1.ts Added // @strict: false directive
tests/cases/fourslash/cloduleAsBaseClass2.ts Added // @strict: false directive
tests/cases/fourslash/cloduleAsBaseClass.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc9.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc9.5.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc8.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc7.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc6.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc3.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc18.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc17.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc12.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc11.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc10.ts Added // @strict: false directive
tests/cases/fourslash/annotateWithTypeFromJSDoc1.ts Added // @strict: false directive

@@ -1,3 +1,4 @@
// @strict: false
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file contains a baseline call (verify.baselineQuickInfo() on line 31), but according to the PR description, the script should have "bailed out if the word 'baseline' appeared anywhere in the file." This file should not have received the // @strict: false directive addition.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's true, but it's fine. I must have fiddled with this manually at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants